/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-09-22 16:37:31
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2024-04-16 15:48:38
 */
import Home from '@/pages/home';
import NoFoundPage from '@/pages/Layout/404';
import NoAuth from '@/pages/Layout/noAuth';
import { Navigate } from 'react-router-dom';
import Layout from '../pages/Layout';
import Login from '../pages/Login';
import Profile from '@/pages/system/user/profile';
import FunctionNavigation from '@/pages/Layout/functionNavigation';

export const LayoutRoutes = {
    element: <Layout />,
    auth: true,
    children: [
        {
            path: 'functionNavigation',
            auth: false,
            element: <FunctionNavigation />
        },
        {
            path: 'home',
            auth: false,
            element: <Home />
        },
        {
            path: 'profile/center',
            auth: false,
            element: <Profile />,
        },
        {
            path: 'noAuth',
            element: <NoAuth />,
            auth: false,
        },
        {
            path: 'notFoundPage',
            element: <NoFoundPage />,
            auth: false,
        }
    ]
}


const MainRoutes = [
    {
        path: '/',
        element: <Navigate to="home" />,
        auth: false
    },
    {
        path: '/login',
        element: <Login />,
        auth: false,
    },
    {
        path: '*',
        element: <Navigate to="notFoundPage" />,
        auth: false,
    }
];

export default MainRoutes;
